From: Luis Felipe Schenone Date: Fri, 26 Sep 2014 10:32:41 +0000 (+0800) Subject: Watchlist: changed "all" for the max number of days available X-Git-Tag: 1.31.0-rc.0~13775^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=572b2b67f2b93a7dabf29061f183ccaa2ea86302;p=lhc%2Fweb%2Fwiklou.git Watchlist: changed "all" for the max number of days available Bug 26022 Continues the change Iffcbc837, which was abandoned for old. Change-Id: I349c801d74dade093a64f17afa8f1d18e0249c3e --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 28349e9dde..ea2242fb08 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5731,9 +5731,9 @@ $wgGitRepositoryViewers = array( /** * Recentchanges items are periodically purged; entries older than this many * seconds will go. - * Default: 13 weeks = about three months + * Default: 90 days = about three months */ -$wgRCMaxAge = 13 * 7 * 24 * 3600; +$wgRCMaxAge = 90 * 24 * 3600; /** * Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 8f2f86b92a..7becfaae11 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -562,12 +562,10 @@ class SpecialWatchlist extends ChangesListSpecialPage { protected function daysLink( $d, $options = array() ) { $options['days'] = $d; - $message = $d ? $this->getLanguage()->formatNum( $d ) - : $this->msg( 'watchlistall2' )->escaped(); return Linker::linkKnown( $this->getPageTitle(), - $message, + $this->getLanguage()->formatNum( $d ), array(), $options ); @@ -581,8 +579,11 @@ class SpecialWatchlist extends ChangesListSpecialPage { * @return string */ protected function cutoffLinks( $days, $options = array() ) { + global $wgRCMaxAge; + $watchlistMaxDays = ceil( $wgRCMaxAge / ( 3600 * 24 ) ); + $hours = array( 1, 2, 6, 12 ); - $days = array( 1, 3, 7 ); + $days = array( 1, 3, 7, $watchlistMaxDays ); $i = 0; foreach ( $hours as $h ) { $hours[$i++] = $this->hoursLink( $h, $options ); @@ -594,8 +595,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { return $this->msg( 'wlshowlast' )->rawParams( $this->getLanguage()->pipeList( $hours ), - $this->getLanguage()->pipeList( $days ), - $this->daysLink( 0, $options ) )->parse(); + $this->getLanguage()->pipeList( $days ) )->parse(); } /** diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 12d14293e5..8cbbd2c2eb 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1828,7 +1828,7 @@ "wlheader-enotif": "Email notification is enabled.", "wlheader-showupdated": "Pages that have been changed since you last visited them are shown in bold.", "wlnote": "Below {{PLURAL:$1|is the last change|are the last $1 changes}} in the last {{PLURAL:$2|hour|$2 hours}}, as of $3, $4.", - "wlshowlast": "Show last $1 hours $2 days $3", + "wlshowlast": "Show last $1 hours $2 days", "watchlist-options": "Watchlist options", "watching": "Watching...", "unwatching": "Unwatching...", @@ -3050,7 +3050,6 @@ "exif-urgency-low": "Low ($1)", "exif-urgency-high": "High ($1)", "exif-urgency-other": "User-defined priority ($1)", - "watchlistall2": "all", "namespacesall": "all", "monthsall": "all", "confirmemail": "Confirm email address", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index d480e2d5a0..db3b894e63 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1990,7 +1990,7 @@ "wlheader-enotif": "Message at the top of [[Special:Watchlist]], after {{msg-mw|watchlist-details}}. Has to be a full sentence.\n\nSee also:\n* {{msg-mw|Watchlist-options|fieldset}}\n* {{msg-mw|enotif reset|Submit button text}}", "wlheader-showupdated": "Message at the top of [[Special:Watchlist]], after {{msg-mw|watchlist-details}}. Has to be a full sentence.", "wlnote": "Used on [[Special:Watchlist]] when a maximum number of hours or days is specified.\n\nParameters:\n* $1 - the number of changes shown\n* $2 - the number of hours for which the changes are shown\n* $3 - a date alone\n* $4 - a time alone", - "wlshowlast": "Appears on [[Special:Watchlist]]. Parameters:\n* $1 - a choice of different numbers of hours (\"1 | 2 | 6 | 12\")\n* $2 - a choice of different numbers of days (\"1 | 3 | 7\")\n* $3 - {{msg-mw|watchlistall2}}\nClicking on your choice changes the list of changes you see (without changing the default in my preferences).", + "wlshowlast": "Appears on [[Special:Watchlist]]. Parameters:\n* $1 - a choice of different numbers of hours (\"1 | 2 | 6 | 12\")\n* $2 - a choice of different numbers of days (\"1 | 3 | 7\")\nClicking on your choice changes the list of changes you see (without changing the default in my preferences).", "watchlist-options": "Legend of the fieldset of [[Special:Watchlist]]\n\nSee also:\n* {{msg-mw|Watchlist-details|watchlist header}}\n* {{msg-mw|Wlheader-enotif|watchlist header}}\n* {{msg-mw|enotif reset|Submit button text}}", "watching": "Text displayed when clicked on the watch tab: {{msg-mw|Watch}}. It means the wiki is adding that page to your watchlist.", "unwatching": "Text displayed when clicked on the unwatch tab: {{msg-mw|Unwatch}}. It means the wiki is removing that page from your watchlist.", @@ -3212,7 +3212,6 @@ "exif-urgency-low": "Parameters:\n* $1 - numeric priority (6-8 for low)\n{{Related|Exif-urgency}}", "exif-urgency-high": "Parameters:\n* $1 - numeric priority (1-4 for high)\n{{Related|Exif-urgency}}", "exif-urgency-other": "Parameters:\n* $1 - numeric priority. Most specs define 0 and 9 to either be reserved or not allowed. However the exiftool documentation defines 0 to be reserved and 9 to be user-defined priority.\n{{Related|Exif-urgency}}", - "watchlistall2": "Appears on [[Special:Watchlist]].\n\nUsed as $3 in the message {{msg-mw|Wlshowlast}}.\n{{Identical|All}}", "namespacesall": "In special page [[Special:WhatLinksHere]]. Drop-down box option for namespace.\n\n{{Identical|All}}", "monthsall": "Used in a drop-down box on [[Special:Contributions]] as an option for \"all months\". See also {{msg-mw|Month}}.\n{{Identical|All}}", "confirmemail": "Title of [[Special:ConfirmEmail]] page.",